<template>
    <div class="right-menu-item hover-effect">
      <div class="msg-box">
        <span v-text="msgCount" class="msg-count"></span>
        <svg-icon icon-class="notification1" style="transform: scale(1.25)"></svg-icon>
        <div class="msg-body">
          <ul>
            <li v-for="(msg,index) in msgList" :key="index">
              <a href="#">msg</a>
            </li>
          </ul>
        </div>
      </div>
    </div>
</template>

<script>
  export default {
    props:{
      msgCount:{
        type:Number,
        default:0
      },
      msgList:{
        type:Array,
        default: ()=>{
          return ['大师傅士大夫','的发射点发射点','sdfdsff']
        }
      }
    },
    data(){
      return {
        activeName:'待办事项'
      }
    },
    methods:{
      handleClick(tabName, event){

      }
    }
  }
</script>
<style lang="scss">
  .msg-body {
    .el-tabs__nav-wrap {
      display: flex;
      justify-content: space-between;
    }
    .el-tabs__nav-scroll {
      padding-left: 10px;
    }
  }
</style>

<style scoped lang="scss">


  .msg-box {
    position: relative;


    .msg-count {
      display: block;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      text-align: center;
      line-height: 15px;
      color:white;
      background: red;
      font-size: 10px;
      position: absolute;
      right: -8px;
      top: 5px;
    }

    .msg-body {
      display: none;
      width: 300px;
      height: 300px;
      background: white;
      box-shadow: 0 0 5px rgba(0,0,0,0.1);
      position: absolute;
      right: 0;
      padding: 15px;

      ul {
        padding: 0;
        margin: 0;
      }
      li {
        list-style: none;
      }
      a {
        font-size: 14px;
      }
    }
  }
</style>
